<?php exit; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$config->site_name} - 进销存 - 后台管理</title>
<link href="{$module_path}css/admin/index.css" rel="stylesheet" type="text/css" />
</head>

<body>
{include file="admin/top.php" subject='index'}
<div id="content">
  {if $smarty.session.managerid}
    <table width="100%" border="0" cellpadding="0" cellspacing="5" id="editor">
      <tr>
        <td valign="top" width="600">
          <div id="floatmenu">
          {rights right='purchases_view'}
          <ul>
            <div>采购</div>
            {rights right='purchases_view'}<a href="{$site_admin}purchases">● 采购订单</a>{/rights}
            {rights right='purchases_create'}<a href="{$site_admin}purchases/create">○ 新建采购</a>{/rights}
            {rights right='suppliers_view'}<a href="{$site_admin}suppliers">● 供应商管理</a>{/rights}
            {rights right='suppliers_create'}<a href="{$site_admin}suppliers/create">○ 添加供应商</a>{/rights}
          </ul>
          {/rights}
          {rights right='orders_view'}
          <ul>
            <div>销售</div>
            {rights right='orders_view'}<a href="{$site_admin}orders">● 销售订单</a>{/rights}
            {rights right='orders_create'}<a href="{$site_admin}orders/create">○ 新建销售</a>{/rights}
            {rights right='customers_view'}<a href="{$site_admin}customers">● 客户管理</a>{/rights}
            {rights right='customers_create'}<a href="{$site_admin}customers/create">○ 添加客户</a>{/rights}
          </ul>
          {/rights}
          {rights right='stocks_view'}
          <ul>
            <div>库存</div>
            {rights right='stocks_view'}<a href="{$site_admin}stocks">● 库存数据</a>{/rights}
            {rights right='income_view'}<a href="{$site_admin}stocks/income">● 采购入库</a>{/rights}
            {rights right='payout_view'}<a href="{$site_admin}stocks/payout">● 销售出库</a>{/rights}
            {rights right='moving_view'}<a href="{$site_admin}moving">● 库存调剂</a>{/rights}
            {rights right='moving_create'}<a href="{$site_admin}moving/create">○ 新建调剂</a>{/rights}
		    {rights right='shops_view'}<a href="{$site_admin}shops">● 配置仓库</a>{/rights}
          </ul>
          {/rights}
          {rights right='products_view'}
          <ul>
            <div>产品</div>
            {rights right='products_view'}<a href="{$site_admin}products">● 产品信息</a>{/rights}
            {rights right='products_create'}<a href="{$site_admin}products/create">○ 添加产品</a>{/rights}
            {rights right='classes_view'}<a href="{$site_admin}classes">● 产品分类</a>{/rights}
            {rights right='classes_create'}<a href="{$site_admin}classes/create">○ 添加分类</a>{/rights}
            {rights right='classes_create|classes_modify|classes_delete'}<a href="{$site_admin}classes/recaches">○ 分类排序</a>{/rights}
          </ul>
          {/rights}
          {rights right='system_view'}
          <ul>
            <div>系统设置</div>
            {rights right='system_view'}<a href="{$site_admin}system">○ 系统信息</a>{/rights}
            {rights right='managers_view'}<a href="{$site_admin}managers">● 管理权限</a>{/rights}
          </ul>
          {/rights}
          </div>
          <p>&nbsp;</p>
          <div id="lc"><img src="../../images/admin/lc.gif" /></div>
        </td>
    	<td valign="top">
   	    <div class="mt10">欢迎使用{$config->site_name}系列软件.</div>
        <p>&nbsp;</p>
<!--
        <strong>使用向导:</strong>
        <p>&nbsp;</p>
        <div>1. 系统没有检测到仓库数据, 请点击<a href="{$site_admin}shops/create">添加仓库</a>信息.</div>
        <div>2. 系统没有检测到产品数据, 请点击<a href="{$site_admin}products/create">添加产品</a>信息.</div>
-->        
		</p>
        <p>&nbsp;</p>
        </td>
      </tr>
    </table>
  {else}
  <form action="{$site_admin}managers/login" method="post">
    <table width="100%" border="0" cellpadding="5" cellspacing="0" id="editor">
      <tr>
        <td width="100" class="title">用户名:</td>
        <td width="240" class="content"><input name="username" type="text" id="username" value="{$smarty.post.username|default:$smarty.cookies.managerusername}" size="30" /></td>
        <td class="content">
        {if $errors.empty_username}<span class="warning">请输入用户名</span>
        {elseif $errors.empty_member}<span class="warning">没有这个用户</span>
        {elseif $errors.member_locked}<span class="warning">抱歉, 账户被锁</span>
        {else}输入管理员账户 (注: 测试账户用户名/密码均为 admin)
        {/if}			</td>
      </tr>
      <tr>
        <td class="title">密码:</td>
        <td class="content"><input name="password" type="password" id="password" value="" size="30" /></td>
        <td class="content">
        {if $errors.empty_password}<span class="warning">密码不能为空</span>
        {elseif $errors.wrong_password}<span class="warning">密码错误</span>
        {else}输入登录密码
        {/if}			</td>
      </tr>
      <tr class="noline">
        <td class="title">验证码:</td>
        <td class="content"><input name="number" type="text" size="30" /></td>
        <td class="content">
        {if $errors.empty_number}<span class="warning">必须输入验证码:</span>
        {elseif $errors.wrong_number}<span class="warning">验证码错误, 请重新输入:</span>
        {else}请输入此右边四位数字:
        {/if}
        <img src="{$site_admin}managers/imagenumber" name="imagenumber" width="80" height="20" border="0" align="absmiddle" id="imagenumber" />
        </td>
      </tr>
    </table>
    
    <div class="fr mt10">
    <input name="action" type="hidden" id="action" value="login" />
    <input type="submit" value="登录" class="btn" />
    </div>
  </form>
  {/if}
</div>
{include file="admin/bottom.php"}
</body>
</html>
